package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.Date;

@Mapper
public interface OrderSettingMapper {

    @Select("select * from t_ordersetting where orderDate=#{orderDate}")
    OrderSetting findByDate(LocalDate orderDate);

    @Update("update t_ordersetting set reservations=reservations+1 where orderDate=#{orderDate}")
    void reservationsAdd(Date orderDate);
}
